﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class NumberChoice : Form
    {
        public NumberChoice()
        {
            InitializeComponent();
        }
        public int figure;
        private void Choice(int Number)
        {
            figure = Number;
            this.DialogResult = DialogResult.OK;
        }

        private void btn1_Click(object sender, EventArgs e)
        {
            Choice(1);
        }

        private void btn2_Click(object sender, EventArgs e)
        {
            Choice(2);
        }

        private void btn3_Click(object sender, EventArgs e)
        {
            Choice(3);            
        }

        private void btn4_Click(object sender, EventArgs e)
        {
            Choice(4);
        }

        private void btn5_Click(object sender, EventArgs e)
        {
            Choice(5);
        }

        private void btn6_Click(object sender, EventArgs e)
        {
            Choice(6);
        }

        private void btn7_Click(object sender, EventArgs e)
        {
            Choice(7);            
        }

        private void btn8_Click(object sender, EventArgs e)
        {
            Choice(8);
        }

        private void btn9_Click(object sender, EventArgs e)
        {
            Choice(9);
        }

        public int SelectedNumber()
        {
            return figure;
        }
    }
}
